#pragma once

#include <common/BlockingQueue.h>
#include <common/DataPlaneUpdate.h>
#include <common/EventBase.h>
#include <common/Pipeline.h>
#include <common/Rule.h>
#include <folly/executors/CPUThreadPoolExecutor.h>
#include <folly/MPMCPipeline.h>

#include <bdd.h>
#include <sylvan_obj.hpp>

namespace flashpp {
class Normalizer : public EventBase {
 public:
  Normalizer(Pipeline& pipeline);

 static std::vector<sylvan::Mtbdd> vars;
  
 private:
  void process(DataPlaneUpdate& dpu);
  static folly::Future<folly::Unit> toBdd(Rule& rule);

  folly::CPUThreadPoolExecutor executor_;
};

} // namespace flashpp